cjson = sjson
-- local ftp = require("ftpserver")
require("config")
local led = require("led")
local delay_timer = require("delay_timer")
local httpmod = require('httpact')
-- 

print("conneting wifi")
led:Flash()

wifi.setmode(wifi.STATION)
wifi.sta.config({
    ssid = "xxx",
    pwd="xxx",
    auto=true,
    save=false,
    got_ip_cb = function (ipInfo)
        print("conneted", delay_timer:GetSecent())
        print("getIP", ipInfo.IP)
        led:StopFlash()
        httpmod:init()
      
        local res = mdns.register("alinlight", {description="Top Fishtank", service="http", port=80, location='Living Room' })
    end,
    dhcp_timeout_cb = function ()
        print("dhcp_timeout_cb")
    end
})




